//
// Created by Castle on 2025/10/30.
//

#include <iostream>
using namespace std;

int main() {
    // 求s = 1 + 2 + 3 .....+ n ，当加到第几项时，s值会超过m？
    int m ,s = 0;
    cin >> m;
    int i = 0;
    while (s <= m) {
        i++;
        s += i;
    }
    cout << i;
    return 0;
}